// 传统登录-用户名+密码
// POST

import type { LoginData, LoginDataParams, WXLoginResult, WxMinLoginDataParams } from '@/types/login'
import { request } from '@/utils/request'

// /login
export const loginAPI = (data: LoginDataParams) => {
  return request<LoginData>('/login', 'POST', data)
}
// 小程序登录
// POST
// /login/wxMin
export const wxMinLoginAPI = (data: WxMinLoginDataParams) => {
  return request<WXLoginResult>('/login/wxMin', 'POST', data)
}
// 模拟手机登录(开发环境)
// 接口地址：/login/wxMin/simple
// 请求方式：POST
export const wxMinSimpleLoginAPI = (phoneNumber: string) => {
  return request<WXLoginResult>('/login/wxMin/simple', 'POST', { phoneNumber })
}
